package com.cat.dataStructure03;

/**
 * @author 曲大人的喵
 * @description https://leetcode.cn/problems/count-total-number-of-colored-cells/
 * @create 2025/11/17 16:38
 * @since JDK17
 */

public class Solution78 {
    public long coloredCells(int n) {
        long ans = 1;
        for (int i = 1; i < n; i++) {
            ans += i << 2;
        }

        return ans;
    }
}
